package com.zaoniao.enstudy.api.vo;

import com.zaoniao.enstudy.domain.entity.ZaoWordExample;
import lombok.Data;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Data
public class ZaoWordExampleVo {

    /**
     * 主键id.
     */
    private Long id;

    /**
     * 例句.
     */
    private String example;

    /**
     * 例句中文翻译.
     */
    private String exampleTranslate;

    /**
     * 发音.(废弃).
     */
    private String pronunciation;

    /**
     * 关联单词.
     */
    private String word;

    @Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
    public interface Converter {

        ZaoWordExampleVo.Converter INSTANCE = Mappers.getMapper(ZaoWordExampleVo.Converter.class);

        ZaoWordExampleVo do2vo (ZaoWordExample wordExample);

        /**
         * doList转voList
         * @param wordList -
         * @return -
         */
        List<ZaoWordExampleVo> do2VoList(List<ZaoWordExample> wordList);

    }
}
